home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news.ul.ie!usenet
- From: vincent.walsh@ul.ie (Vincent Walsh)
- Subject: Help trapping stdout from Unix system() call
- Message-ID: <DpnGsD.Mo2@ul.ie>
- Sender: walshv@ul.ie (Vincent Walsh)
- Nntp-Posting-Host: 136.201.5.93
- Organization: University of Limerick
- X-Newsreader: knews 0.9.6
- Date: Wed, 10 Apr 1996 14:12:12 GMT
-
- Hi All,
- I have a problem and would appreciate is someone could help me!
-
- Within a C program I call another C program and I want to trap the output
- of the second C program into a buffer. I tried using fopen, etc.. and
- system() calls, but to no avail.
- I also tried using popen to call the second C program and this trapped the
- stdout into a buffer, but not stderr. Which means my buffer will tell me
- the results if the second program works, but my buffer is empty if the
- second program outputs to stderr!!
-
- I'm confused
-
- Thanks
- Vincent Walsh
- vincent.walsh@ul.ie
-
-